-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fallible version of the digital traits and deprecate the current ones #108
Add fallible version of the digital traits and deprecate the current ones #108
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks very much for keeping at it.
@hannobraun @ryankurte Are you okay with this? |
@rust-embedded/hal Any other opinions? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Sorry, accidentally submitted this comment early. I edited it to complete it.)
It's possible to add additional information to #[deprecated]
, namely the version since when something has been deprecated, and a note that is going to be part of the compiler warning (I think). This is documented here: https://doc.rust-lang.org/reference/attributes.html
It would be nice to have this, but I'm fine merging this pull request without.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant to approve this pull request, but accidentally submitted my comment before it was complete. See my other comment for a note on a nice-to-have item.
Thank you @eldruin for sticking with this! I know working on this project is not easy :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you again, @eldruin! You're really going above and beyond what can reasonably be expected. I really appreciate it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me! Thanks again @eldruin for working with us through all this.
We don't currently have an adaptor between v1 and v2, do we want to provide that? (I suggest as a separate PR if so).
Is there anything missing here? |
We still need adapter traits (see #100 for examples) before we release, but I'll merge this for now. bors r+ |
👎 Rejected by label |
Oops, @therealprof are you still happy with this? |
@ryankurte Yepp, I'm good. Needs conflict resolution, though. |
14cac99
bors r+ |
👎 Rejected by too few approved reviews |
whoops bors r+ |
108: Add fallible version of the digital traits and deprecate the current ones r=ryankurte a=eldruin There seems to be an agreement in [#100](#100 (comment)) on how to proceed with the fallible traits. This adds the fallible traits under `digital::v2` and marks the current ones as deprecated. Co-authored-by: Diego Barrios Romero <eldruin@gmail.com> Co-authored-by: Ryan <ryankurte@users.noreply.github.com>
Build failed |
Funny complaints from the nightly compiler. 👎 @rust-embedded/resources Should we make the nightly compiler builds informal only, i.e. not fail CI? Our main target is beta/stable anyways. |
This might be because two of the doc tests rely on nightly features (https://github.com/rust-embedded/embedded-hal/blob/master/src/lib.rs#L385 ++ and https://github.com/rust-embedded/embedded-hal/blob/master/src/lib.rs#L557 ++). Maybe the doc test for these two should be tagged with the but either way the failed doc test doesn't have anything to do with this PR. |
bors try |
tryBuild succeeded |
bors r+ |
108: Add fallible version of the digital traits and deprecate the current ones r=ryankurte a=eldruin There seems to be an agreement in [#100](#100 (comment)) on how to proceed with the fallible traits. This adds the fallible traits under `digital::v2` and marks the current ones as deprecated. Co-authored-by: Diego Barrios Romero <eldruin@gmail.com> Co-authored-by: Ryan <ryankurte@users.noreply.github.com>
Build succeeded |
There seems to be an agreement in #100 on how to proceed with the fallible traits.
This adds the fallible traits under
digital::v2
and marks the current ones as deprecated.This solves #95